package Meituan.Feature;

import com.google.common.base.Splitter;
import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * @author: leiwenkang
 * @date: 2020/5/3
 * @time: 09:46
 */
public class FeatureAddZero {
    public static void main(String[] args) {
        String str = "MT_AGE(\"13252_0\", \"年龄\", \"mt_age\"),\n" +
                "    MT_GENDER(\"87_0\", \"性别\", \"mt_gender\"),\n" +
                "    MT_JOB(\"135_0\", \"职业\", \"mt_job\"),\n" +
                "    MT_EDU_LEVEL(\"136_0\", \"教育程度\", \"mt_edu_level\"),\n" +
                "    MT_SALARY_LEVEL(\"3272_0\", \"收入水平\", \"mt_salary_level\"),\n" +
                "    MT_MARITAL_STATUS(\"88_0\", \"是否已婚\", \"mt_marital_status\"),\n" +
                "    MT_HAVE_CHILD(\"89_0\", \"是否有小孩\", \"mt_have_child\"),\n" +
                "    MT_CONSUME_STYLE(\"404_0\", \"消费类型\", \"mt_consume_style\"),\n" +
                "    LATENT_PROB(\"13614_0\", \"闪购潜客分层\", \"latent_prob\"),\n" +
                "    SENSI_SCORE(\"4995_0\", \"美团APP优惠敏感度\", \"sensi_score\"),\n" +
                "    MT_DAOZONG_SCORE(\"4997_0\", \"所属到店综合事业群的优惠敏感度分数\", \"mt_daozong_score\"),\n" +
                "    MT_HOTEL_SCORE(\"4988_0\", \"所属酒店旅游事业群的优惠敏感度分数\", \"mt_hotel_score\"),\n" +
                "    MT_MAOYAN_SCORE(\"4982_0\", \"所属猫眼文化的优惠敏感度分数\", \"mt_maoyan_score\"),\n" +
                "    MT_WAIMAI_SCORE(\"4979_0\", \"所属外卖配送事业群的优惠敏感度分数\", \"mt_waimai_score\"),\n" +
                "    MT_DAOCAN_SCORE(\"4976_0\", \"所属到店餐饮事业群的优惠敏感度分数\", \"mt_daocan_score\"),\n" +
                "  //MT_WAIMAI_P(\"3949_0\", \"未来7天在外卖事业部的下单概率\",\"mt_waimai_p\"),\n" +
                "    MT_IS_TOUCH(\"406_0\", \"最近一年内push是否触达\", \"mt_is_touch\"),\n" +
                "    MT_PUSH_SENSITIVITY_SCORE(\"405_0\", \"push打开敏感度得分\", \"mt_push_sensitivity_score\"),\n" +
                "    CONSUME_WAIMAI_LEVEL(\"4789_0\", \"外卖事业部消费水平\", \"consume_waimai_level\"),\n" +
                "    CONSUME_DAOCAN_LEVEL(\"4790_0\", \"到餐事业部消费水平\", \"consume_daocan_level\"),\n" +
                "    CONSUME_MAOYAN_LEVEL(\"4792_0\", \"猫眼事业部消费水平\", \"consume_maoyan_level\"),\n" +
                "    CONSUME_ENJOY_LEVEL(\"4799_0\", \"休闲娱乐事业部消费水平\", \"consume_enjoy_level\"),\n" +
                "    CONSUME_HOTEL_LEVEL(\"4793_0\", \"住宿事业部消费水平\", \"consume_hotel_level\"),\n" +
                "    CONSUME_JINGNEI_LEVEL(\"4794_0\", \"境内度假事业部消费水平\", \"consume_jingnei_level\"),\n" +
                "    CONSUME_BEAUTY_LEVEL(\"4800_0\", \"丽人及亲子消费水平\", \"consume_beauty_level\"),\n" +
                "    CONSUME_TRAFFIC_LEVEL(\"4796_0\", \"大交通事业部消费水平\", \"consume_traffic_level\"),\n" +
                "    CONSUME_PEISONG_LEVEL(\"4798_0\", \"配送事业部消费水平\", \"consume_peisong_level\"),\n" +
                "    CONSUME_MARRIAGE_LEVEL(\"4801_0\", \"结婚事业部消费水平\", \"consume_marriage_level\"),\n" +
                "    CONSUME_JINGWAI_LEVEL(\"4795_0\", \"境外度假业务部消费水平\", \"consume_jingwai_level\"),\n" +
                "    CONSUME_GOUWU_LEVEL(\"4802_0\", \"购物事业部消费水平\", \"consume_gouwu_level\"),\n" +
                "    CONSUME_HOMEEDU_LEVEL(\"4803_0\", \"家装及教育培训消费水平\", \"consume_homeedu_level\"),\n" +
                "    CONSUME_ZHENGUO_LEVEL(\"4797_0\", \"榛果民宿训消费水平\", \"consume_zhenguo_level\"),\n" +
                "    USER_VALUE_WAIMAI_M_SCORE(\"4280_0\", \"外卖配送Monetray维度得分\", \"waimai_m_score\"),\n" +
                "    USER_VALUE_WAIMAI_R_SCORE(\"4282_0\", \"外卖配送Recency维度得分\", \"waimai_r_score\"),\n" +
                "    USER_VALUE_WAIMAI_F_SCORE(\"4281_0\", \"外卖配送Frequency维度得分\", \"waimai_f_score\"),\n" +
                "    USER_VALUE_WAIMAI_RE_SCORE(\"4279_0\", \"外卖配送Rebuy维度得分\", \"waimai_re_score\"),\n" +
                "    USER_VALUE_DAOCAN_M_SCORE(\"4286_0\", \"到餐Monetray维度得分\", \"daocan_m_score\"),\n" +
                "    USER_VALUE_DAOCAN_R_SCORE(\"4284_0\", \"到餐Recency维度得分\", \"daocan_r_score\"),\n" +
                "    USER_VALUE_DAOCAN_F_SCORE(\"4285_0\", \"到餐Frequency维度得分\", \"daocan_f_score\"),\n" +
                "    USER_VALUE_DAOCAN_RE_SCORE(\"4287_0\", \"到餐Rebuy维度得分\", \"daocan_re_score\"),\n" +
                "    USER_VALUE_DAOZONG_M_SCORE(\"4290_0\", \"到综Monetray维度得分\", \"daozong_m_score\"),\n" +
                "    USER_VALUE_DAOZONG_R_SCORE(\"4292_0\", \"到综Recency维度得分\", \"daozong_r_score\"),\n" +
                "    USER_VALUE_DAOZONG_F_SCORE(\"4291_0\", \"到综Frequency维度得分\", \"daozong_f_score\"),\n" +
                "    USER_VALUE_DAOZONG_RE_SCORE(\"4289_0\", \"到综Rebuy维度得分\", \"daozong_re_score\"),\n" +
                "    USER_VALUE_HOTEL_M_SCORE(\"4296_0\", \"酒旅Monetray维度得分\", \"hotel_m_score\"),\n" +
                "    USER_VALUE_HOTEL_R_SCORE(\"4294_0\", \"酒旅Recency维度得分\", \"hotel_r_score\"),\n" +
                "    USER_VALUE_HOTEL_F_SCORE(\"4295_0\", \"酒旅Frequency维度得分\", \"hotel_f_score\"),\n" +
                "    USER_VALUE_HOTEL_RE_SCORE(\"4297_0\", \"酒旅Rebuy维度得分\", \"hotel_re_score\"),\n" +
                "    USER_VALUE_MAOYAN_M_SCORE(\"4301_0\", \"猫眼Monetray维度得分\", \"maoyan_m_score\"),\n" +
                "    USER_VALUE_MAOYAN_R_SCORE(\"4302_0\", \"猫眼Recency维度得分\", \"maoyan_r_score\"),\n" +
                "    USER_VALUE_MAOYAN_F_SCORE(\"4300_0\", \"猫眼Frequency维度得分\", \"maoyan_f_score\"),\n" +
                "    USER_VALUE_MAOYAN_RE_SCORE(\"4299_0\", \"猫眼Rebuy维度得分\", \"maoyan_re_score\");";


        addZero(str);
    }

    private static void addZero(String str) {
        if (StringUtils.isBlank(str)) {
            return;
        }

        List<String> list = Splitter.on("\n").splitToList(str);
        for (int i = 0; i < list.size(); i++) {
            String value = list.get(i);

            String flag = "false";
            if (value.contains("消费水平")) {
                flag = "true";
            }
            String content = value.substring(0, value.lastIndexOf(")")) + ",\""+ flag + "\"),";

            System.out.println(content);
        }

    }
}
